#ifndef THRESHOLD_PLUGIN_H
#define THRESHOLD_PLUGIN_H

#include "threshold_plugin_global.h"
#include "cvplugininterface.h"


namespace Ui {
    class PluginGui;
}

class THRESHOLD_PLUGINSHARED_EXPORT Threshold_Plugin: public QObject, public CvPluginInterface
{
    Q_OBJECT
    Q_PLUGIN_METADATA(IID "com.computervision.cvplugininterface")
    Q_INTERFACES(CvPluginInterface)
public:
    Threshold_Plugin();
    ~Threshold_Plugin();

    QString title();
    QString version();
    QString description();
    QString help();
    void setupUi(QWidget *parent);
    void processImage(const cv::Mat &inputImage, cv::Mat &outputImage);

signals:
    void updateNeeded();
    void errorMessage(QString msg);
    void infoMessage(QString msg);

private slots:

    void on_threshTypeCombo_currentIndexChanged(int index);

    void on_threshSlider_valueChanged(int value);

    void on_threshMaxSlider_valueChanged(int value);

    void on_adapTypeComboBox_currentIndexChanged(int index);

    void on_adapMethComboBox_currentIndexChanged(int index);

    void on_horizontalSlider_valueChanged(int value);

    void on_blockSpinBox_valueChanged(int arg1);

    void on_adapMaxSlider_valueChanged(int value);

    void on_tabWidget_currentChanged(int index);

    void openURL(QString url);

private:
    Ui::PluginGui *ui;

};

#endif // THRESHOLD_PLUGIN_H
